//
//  HMWebViewController.swift
//  webo
//
//  Created by apple on 2016/11/26.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit
import SVProgressHUD
class HMWebViewController: UIViewController,UIWebViewDelegate {
    
    var webview = UIWebView()
    var urlString: String?
    override func loadView() {
        view = webview
//        print(urlString)
        guard urlString != nil else {
            return
        }
        let request = URLRequest(url: URL(string: urlString!)!)
        webview.loadRequest(request)
        webview.delegate = self
    }
    
    
    func webViewDidStartLoad(_ webView: UIWebView) {
        SVProgressHUD.show()
    }
    func webViewDidFinishLoad(_ webView: UIWebView) {
        SVProgressHUD.dismiss()
    }
    
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        SVProgressHUD.dismiss()
    }

    override func viewDidLoad() {
        super.viewDidLoad()

    }
}
